package com.imooc.es.pojo;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Document(indexName = "stu", type = "_doc", shards = 3, replicas = 0)
public class Stu {

  @Id
  private Long stuId;

  @Field(store = true)
  private String name;

  @Field(store = true)
  private Integer age;

  @Field(store = true)
  private Float money;

  @Field(store = true, type = FieldType.Keyword)
  private String sign;

  @Field(store = true)
  private String description;

  public Long getStuId() {
    return stuId;
  }

  public void setStuId(Long stuId) {
    this.stuId = stuId;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public Integer getAge() {
    return age;
  }

  public void setAge(Integer age) {
    this.age = age;
  }

  public Float getMoney() {
    return money;
  }

  public void setMoney(Float money) {
    this.money = money;
  }

  public String getSign() {
    return sign;
  }

  public void setSign(String sign) {
    this.sign = sign;
  }

  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  @Override
  public String toString() {
    return "Stu{" +
        "stuId=" + stuId +
        ", name='" + name + '\'' +
        ", age=" + age +
        ", money=" + money +
        ", sign='" + sign + '\'' +
        ", description='" + description + '\'' +
        '}';
  }
}
